LambdaのランタイムにAmazon Linux2023が追加されたので色々コマンドを叩いて確認してみた

LambdaのランタイムにAmazon Linux2023が追加されたので色々コマンドを叩いて確認してみた

/binの中身とかを確認するいつものやつです
Clock Icon2023.11.11

この記事は公開されてから1年以上経過しています。情報が古い可能性がありますので、ご注意ください。

LambdaのランタイムにAmazon Linux2023が追加されたので色々コマンドを叩いて確認してみた

CX事業部@大阪の岩田です。

先日のアップデートによりLambdaのライタイムにAmazon Linux2023ベースのカスタムランタイムが利用できるようになりました

ということで、Amazon Linux2が利用可能になった時のようにLambda実行環境の中がどうなっているか色々確認していこうと思います。確認の手順などについても以下のブログを参考にしてください。

環境

今回検証に利用した環境です

  • Lambdaのランタイム: Custom runtime on Amazon Linux 2023
    • Runtime Version: provided:al2023.v9
    • Runtime Version ARN: arn:aws:lambda:ap-northeast-1::runtime:d80ae7d0329b1d13142fc95c6d80796ca7968e0281bd37f037783874f69a600b
    • アーキテクチャ: x86_64

コマンドの実行結果

ここからはひたすらコマンドの実行結果を貼り付けていきます。

uname -a

Linux 169.254.0.165 5.10.196-205.748.amzn2.x86_64 #1 SMP Fri Oct 6 23:55:41 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

cat /etc/os-release

NAME="Amazon Linux"
VERSION="2023"
ID="amzn"
ID_LIKE="fedora"
VERSION_ID="2023"
PLATFORM_ID="platform:al2023"
PRETTY_NAME="Amazon Linux 2023"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2023"
HOME_URL="https://aws.amazon.com/linux/"
BUG_REPORT_URL="https://github.com/amazonlinux/amazon-linux-2023"
SUPPORT_END="2028-03-01"
VARIANT_ID="202310201544-2023.89.0"

ls /

bin
boot
dev
etc
home
lambda-entrypoint.sh
lib
lib64
local
media
mnt
opt
proc
root
run
sbin
srv
sys
tmp
usr
var

ls /bin | sort

alias
arch
awk
b2sum
base32
base64
basename
basenc
bash
bashbug
bashbug-64
bg
ca-legacy
cat
catchsegv
cd
chcon
chgrp
chmod
chown
cksum
comm
command
coreutils
cp
csplit
curl
cut
date
dd
df
dir
dircolors
dirname
dnf
du
echo
egrep
env
expand
expr
factor
false
fc
fg
fgrep
fmt
fold
gapplication
gawk
gdbus
gencat
getconf
getent
getopts
gio
gio-querymodules-64
glib-compile-schemas
gpg
gpg-error
gpg2
gpgme-json
gpgv2
grep
groups
gsettings
hash
head
hostid
iconv
id
install
jobs
join
ld.so
ldd
link
ln
locale
localedef
logname
ls
md5sum
microdnf
mkdir
mkfifo
mknod
mktemp
modulemd-validator
mv
nice
nl
nohup
nproc
numfmt
od
p11-kit
paste
pathchk
pinky
pldd
pr
printenv
printf
ptx
pwd
read
readlink
realpath
rm
rmdir
rpm
rpm2archive
rpm2cpio
rpmdb
rpmkeys
rpmquery
rpmverify
runcon
sed
seq
sh
sha1sum
sha224sum
sha256sum
sha384sum
sha512sum
shred
shuf
sleep
sort
sotruss
split
sprof
stat
stdbuf
stty
sum
sync
tac
tail
tee
test
timeout
touch
tr
true
truncate
trust
tsort
tty
type
tzselect
ulimit
umask
unalias
uname
unexpand
uniq
unlink
update-ca-trust
users
vdir
wait
wc
who
whoami
xmlcatalog
xmllint
yes
zdump

ls /sbin | sort

alternatives
capsh
chroot
getcap
getpcaps
iconvconfig
ldconfig
setcap
update-alternatives
zic

rpm -qa | sort

alternatives-1.15-2.amzn2023.0.2.x86_64
amazon-linux-repo-cdn-2023.2.20231016-0.amzn2023.noarch
audit-libs-3.0.6-1.amzn2023.0.2.x86_64
basesystem-11-11.amzn2023.0.2.noarch
bash-5.2.15-1.amzn2023.0.2.x86_64
bzip2-libs-1.0.8-6.amzn2023.0.2.x86_64
ca-certificates-2023.2.60-1.0.amzn2023.0.3.noarch
coreutils-single-8.32-30.amzn2023.0.3.x86_64
crypto-policies-20220428-1.gitdfb10ea.amzn2023.0.2.noarch
curl-minimal-8.3.0-1.amzn2023.0.2.x86_64
dnf-data-4.12.0-2.amzn2023.0.4.noarch
file-libs-5.39-7.amzn2023.0.4.x86_64
filesystem-3.14-5.amzn2023.0.3.x86_64
gawk-5.1.0-3.amzn2023.0.3.x86_64
glib2-2.74.7-689.amzn2023.0.2.x86_64
glibc-2.34-52.amzn2023.0.6.x86_64
glibc-common-2.34-52.amzn2023.0.6.x86_64
glibc-minimal-langpack-2.34-52.amzn2023.0.6.x86_64
gmp-6.2.1-2.amzn2023.0.2.x86_64
gnupg2-minimal-2.3.7-1.amzn2023.0.4.x86_64
gobject-introspection-1.73.0-2.amzn2023.0.3.x86_64
gpg-pubkey-d832c631-6515c85e
gpgme-1.15.1-6.amzn2023.0.3.x86_64
grep-3.8-1.amzn2023.0.4.x86_64
json-c-0.14-8.amzn2023.0.2.x86_64
keyutils-libs-1.6.3-1.amzn2023.x86_64
krb5-libs-1.21-3.amzn2023.0.3.x86_64
libacl-2.3.1-2.amzn2023.0.2.x86_64
libarchive-3.5.3-2.amzn2023.0.3.x86_64
libassuan-2.5.5-1.amzn2023.0.2.x86_64
libattr-2.5.1-3.amzn2023.0.2.x86_64
libblkid-2.37.4-1.amzn2023.0.3.x86_64
libcap-2.48-2.amzn2023.0.3.x86_64
libcap-ng-0.8.2-4.amzn2023.0.2.x86_64
libcom_err-1.46.5-2.amzn2023.0.2.x86_64
libcurl-minimal-8.3.0-1.amzn2023.0.2.x86_64
libdnf-0.67.0-1.amzn2023.0.5.x86_64
libffi-3.4.4-1.amzn2023.0.1.x86_64
libgcc-11.4.1-2.amzn2023.0.2.x86_64
libgcrypt-1.10.2-1.amzn2023.0.1.x86_64
libgpg-error-1.42-1.amzn2023.0.2.x86_64
libidn2-2.3.2-1.amzn2023.0.5.x86_64
libmodulemd-2.13.0-2.amzn2023.0.2.x86_64
libmount-2.37.4-1.amzn2023.0.3.x86_64
libnghttp2-1.57.0-1.amzn2023.0.1.x86_64
libpeas-1.32.0-1.amzn2023.0.3.x86_64
librepo-1.14.2-1.amzn2023.0.4.x86_64
libreport-filesystem-2.15.2-2.amzn2023.0.2.noarch
libselinux-3.4-5.amzn2023.0.2.x86_64
libsepol-3.4-3.amzn2023.0.3.x86_64
libsigsegv-2.13-2.amzn2023.0.2.x86_64
libsmartcols-2.37.4-1.amzn2023.0.3.x86_64
libsolv-0.7.22-1.amzn2023.0.2.x86_64
libstdc++-11.4.1-2.amzn2023.0.2.x86_64
libtasn1-4.19.0-1.amzn2023.0.4.x86_64
libunistring-0.9.10-10.amzn2023.0.2.x86_64
libuuid-2.37.4-1.amzn2023.0.3.x86_64
libverto-0.3.2-1.amzn2023.0.2.x86_64
libxml2-2.10.4-1.amzn2023.0.5.x86_64
libyaml-0.2.5-5.amzn2023.0.2.x86_64
libzstd-1.5.2-1.amzn2023.0.3.x86_64
lua-libs-5.4.4-3.amzn2023.0.2.x86_64
lz4-libs-1.9.4-1.amzn2023.0.2.x86_64
microdnf-3.8.1-1.amzn2023.0.1.x86_64
microdnf-dnf-3.8.1-1.amzn2023.0.1.x86_64
mpfr-4.1.0-7.amzn2023.0.2.x86_64
ncurses-base-6.2-4.20200222.amzn2023.0.4.noarch
ncurses-libs-6.2-4.20200222.amzn2023.0.4.x86_64
npth-1.6-6.amzn2023.0.2.x86_64
openssl-libs-3.0.8-1.amzn2023.0.7.x86_64
p11-kit-0.24.1-2.amzn2023.0.3.x86_64
p11-kit-trust-0.24.1-2.amzn2023.0.3.x86_64
pcre2-10.40-1.amzn2023.0.3.x86_64
pcre2-syntax-10.40-1.amzn2023.0.3.noarch
popt-1.18-6.amzn2023.0.2.x86_64
readline-8.1-2.amzn2023.0.2.x86_64
rpm-4.16.1.3-12.amzn2023.0.6.x86_64
rpm-libs-4.16.1.3-12.amzn2023.0.6.x86_64
sed-4.8-7.amzn2023.0.2.x86_64
setup-2.13.7-3.amzn2023.0.2.noarch
sqlite-libs-3.40.0-1.amzn2023.0.3.x86_64
system-release-2023.2.20231016-0.amzn2023.noarch
xz-libs-5.2.5-9.amzn2023.0.2.x86_64
zlib-1.2.11-33.amzn2023.0.4.x86_64

df

Filesystem     1K-blocks      Used Available Use% Mounted on
/dev/vde       156247936 154187768         0 100% /
/dev/vdb         1486216      9536   1460296   1% /dev
/dev/vdd          537560        12    525712   1% /tmp
/dev/root       10153236    565992   9570860   6% /etc/passwd
/dev/vdc             128       128         0 100% /var/task

whoami

sbx_user1051

cat /etc/mtab

LABEL=/     /           auto    defaults,noatime  1   1

cat /proc/mounts

/dev/vde / ext4 ro,nosuid,nodev,relatime 0 0
/dev/vdb /dev ext4 rw,nosuid,noexec,noatime,data=writeback 0 0
/dev/vdd /tmp ext4 rw,relatime,data=writeback 0 0
none /proc proc rw,nosuid,nodev,noexec,noatime 0 0
/dev/vdb /proc/sys/kernel/random/boot_id ext4 ro,nosuid,nodev,noatime,data=writeback 0 0
/dev/root /etc/passwd ext4 ro,nosuid,nodev,relatime 0 0
/dev/root /var/runtime ext4 ro,nosuid,nodev,relatime 0 0
/dev/vdb /etc/resolv.conf ext4 ro,nosuid,nodev,noatime,data=writeback 0 0
/dev/vdc /var/task squashfs ro,nosuid,nodev,relatime 0 0

cat /proc/cgroups

#subsys_name    hierarchy   num_cgroups enabled
cpuset  5   1   1
cpu 7   5   1
cpuacct 7   5   1
blkio   8   1   1
memory  9   5   1
devices 10  1   1
freezer 3   2   1
net_cls 4   1   1
perf_event  2   1   1
net_prio    4   1   1
hugetlb 11  1   1
pids    6   1   1

cat /proc/cpuinfo

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 63
model name  : Intel(R) Xeon(R) Processor @ 2.50GHz
stepping    : 2
microcode   : 0x1
cpu MHz     : 2500.010
cache size  : 36608 KB
physical id : 0
siblings    : 2
core id     : 0
cpu cores   : 2
apicid      : 0
initial apicid  : 0
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm cpuid_fault invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid smap xsaveopt arat md_clear arch_capabilities
bugs        : spectre_v1 spectre_v2 spec_store_bypass swapgs mmio_stale_data
bogomips    : 5000.02
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:

processor   : 1
vendor_id   : GenuineIntel
cpu family  : 6
model       : 63
model name  : Intel(R) Xeon(R) Processor @ 2.50GHz
stepping    : 2
microcode   : 0x1
cpu MHz     : 2500.010
cache size  : 36608 KB
physical id : 0
siblings    : 2
core id     : 1
cpu cores   : 2
apicid      : 1
initial apicid  : 1
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm cpuid_fault invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid smap xsaveopt arat md_clear arch_capabilities
bugs        : spectre_v1 spectre_v2 spec_store_bypass swapgs mmio_stale_data
bogomips    : 5000.02
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:

cat /proc/devices

Character devices:
  1 mem
  4 /dev/vc/0
  4 tty
  4 ttyS
  5 /dev/tty
  5 /dev/console
  5 /dev/ptmx
  7 vcs
 10 misc
 13 input
128 ptm
136 pts
202 cpu/msr
203 cpu/cpuid
250 hidraw
251 bsg
252 watchdog
253 ptp
254 pps

Block devices:
  7 loop
254 virtblk
259 blkext

cat /proc/filesystems

nodev   sysfs
nodev   tmpfs
nodev   bdev
nodev   proc
nodev   cgroup
nodev   cgroup2
nodev   cpuset
nodev   devtmpfs
nodev   binfmt_misc
nodev   debugfs
nodev   securityfs
nodev   sockfs
nodev   bpf
nodev   pipefs
nodev   ramfs
nodev   hugetlbfs
nodev   rpc_pipefs
nodev   devpts
    ext3
    ext2
    ext4
    squashfs
nodev   nfs
nodev   nfs4
nodev   autofs
nodev   overlay
    xfs
nodev   mqueue
nodev   pstore

まとめ

なにか気になる結果などあったでしょうか? 利用可能なOSコマンドなど少し変わっているので、もしOSコマンドを利用しているLambda関数があれば移行にあたっては十分ご注意ください。

Share this article

facebook logohatena logotwitter logo

© Classmethod, Inc. All rights reserved.